#ifndef __TREENODE_H__
#define __TREENODE_H__

#include "Common.h"
#include "Object.h"

NAME_SPACE_BEGIN
template < typename T >
class TreeNode : public Object
{
public:
	using base_node_type = TreeNode<T>;
	using node_pointer = base_node_type*;
	using node_reference = base_node_type&;
	using node_const_reference = const node_reference;

	using value_type = T;

public:
	TreeNode() {
		m_flag = false;
		parent = nullptr;
	}

	bool flag()
	{
		return m_flag;
	}

	virtual ~TreeNode() = 0;


	// member
	node_pointer parent;
	T value;

protected:
	bool m_flag;


	void* operator new(std::size_t size) noexcept
	{
		return Object::operator new(size);
	}
};

template < typename T >
TreeNode<T>::~TreeNode()
{

}

NAME_SPACE_END

#endif